package com.github.ghsea.kafka.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

/**
 * @author guhai
 */
@Configuration
@ConfigurationProperties(prefix = "kafka")
@PropertySource("classpath:application.yml")
@Data
public class KafkaProperties {

    private String bootstrapServers;

    @Autowired(required=false)
    private ProducerProperties producer;

    @Autowired(required=false)
    private ConsumerProperties  consumer;

}
